# 作者：石吴震
# 2024年12月28日21时32分34秒
# 474160957@qq.com


  #1、多个缺省参数的传递练习，练习多个缺省参数
def use_transfer1(num,name='张三'):
    print(num)
    print(name)


use_transfer1(123)

def use_transfer2(name,title=' ',gender=True):
    gender_text =gender
    if gender:
        gender_text = '男'
    else:
        gender_text = '女'
    print(name)
    print(title)
    print(gender_text)

use_transfer2('李四','性别')

def use_transfer3(num,title=' ',gender=True):
    gender_text =gender
    if gender:
        gender_text = '男'
    else:
        gender_text = '女'
    print(num)
    print(title)
    print(gender_text)

use_transfer3(100,'性别','女')

  #2、多值参数练习，元组，字典的传参拆包练习

def use_transfer4(num1,*args,**kwargs):
    print(num1)
    print(args)
    print(kwargs)

use_transfer4(1,2,3,[4,5,6],4,5,name='张三',age=20)

  #3.设计一个类，实例化1个对象，会实现下面两种行为

class Animal:
    def __init__(self,name,color,species):
        self.name = name
        self.color = color
        self.species = species


    def shout(self):
        print('汪汪汪')

    def Wagging(self):
        print('摇尾巴')
